Integrand size = 23, antiderivative size = 183 \[ \int \frac {(a+b \arctan (c+d x))^2}{c e+d e x} \, dx=\frac {2 (a+b \arctan (c+d x))^2 \text {arctanh}\left (1-\frac {2}{1+i (c+d x)}\right )}{d e}-\frac {i b (a+b \arctan (c+d x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1+i (c+d x)}\right )}{d e}+\frac {i b (a+b \arctan (c+d x)) \operatorname {PolyLog}\left (2,-1+\frac {2}{1+i (c+d x)}\right )}{d e}-\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2}{1+i (c+d x)}\right )}{2 d e}+\frac {b^2 \operatorname {PolyLog}\left (3,-1+\frac {2}{1+i (c+d x)}\right )}{2 d e} \]
[Out]
Time = 0.21 (sec) , antiderivative size = 183, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {5151, 12, 4942, 5108, 5004, 5114, 6745} \[ \int \frac {(a+b \arctan (c+d x))^2}{c e+d e x} \, dx=\frac {2 \text {arctanh}\left (1-\frac {2}{1+i (c+d x)}\right ) (a+b \arctan (c+d x))^2}{d e}-\frac {i b \operatorname {PolyLog}\left (2,1-\frac {2}{i (c+d x)+1}\right ) (a+b \arctan (c+d x))}{d e}+\frac {i b \operatorname {PolyLog}\left (2,\frac {2}{i (c+d x)+1}-1\right ) (a+b \arctan (c+d x))}{d e}-\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2}{i (c+d x)+1}\right )}{2 d e}+\frac {b^2 \operatorname {PolyLog}\left (3,\frac {2}{i (c+d x)+1}-1\right )}{2 d e} \]
[In]
[Out]
Rule 12
Rule 4942
Rule 5004
Rule 5108
Rule 5114
Rule 5151
Rule 6745
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {(a+b \arctan (x))^2}{e x} \, dx,x,c+d x\right )}{d} \\ & = \frac {\text {Subst}\left (\int \frac {(a+b \arctan (x))^2}{x} \, dx,x,c+d x\right )}{d e} \\ & = \frac {2 (a+b \arctan (c+d x))^2 \text {arctanh}\left (1-\frac {2}{1+i (c+d x)}\right )}{d e}-\frac {(4 b) \text {Subst}\left (\int \frac {(a+b \arctan (x)) \text {arctanh}\left (1-\frac {2}{1+i x}\right )}{1+x^2} \, dx,x,c+d x\right )}{d e} \\ & = \frac {2 (a+b \arctan (c+d x))^2 \text {arctanh}\left (1-\frac {2}{1+i (c+d x)}\right )}{d e}-\frac {(2 b) \text {Subst}\left (\int \frac {(a+b \arctan (x)) \log \left (2-\frac {2}{1+i x}\right )}{1+x^2} \, dx,x,c+d x\right )}{d e}+\frac {(2 b) \text {Subst}\left (\int \frac {(a+b \arctan (x)) \log \left (\frac {2}{1+i x}\right )}{1+x^2} \, dx,x,c+d x\right )}{d e} \\ & = \frac {2 (a+b \arctan (c+d x))^2 \text {arctanh}\left (1-\frac {2}{1+i (c+d x)}\right )}{d e}-\frac {i b (a+b \arctan (c+d x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1+i (c+d x)}\right )}{d e}+\frac {i b (a+b \arctan (c+d x)) \operatorname {PolyLog}\left (2,-1+\frac {2}{1+i (c+d x)}\right )}{d e}+\frac {\left (i b^2\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}\left (2,1-\frac {2}{1+i x}\right )}{1+x^2} \, dx,x,c+d x\right )}{d e}-\frac {\left (i b^2\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}\left (2,-1+\frac {2}{1+i x}\right )}{1+x^2} \, dx,x,c+d x\right )}{d e} \\ & = \frac {2 (a+b \arctan (c+d x))^2 \text {arctanh}\left (1-\frac {2}{1+i (c+d x)}\right )}{d e}-\frac {i b (a+b \arctan (c+d x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1+i (c+d x)}\right )}{d e}+\frac {i b (a+b \arctan (c+d x)) \operatorname {PolyLog}\left (2,-1+\frac {2}{1+i (c+d x)}\right )}{d e}-\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2}{1+i (c+d x)}\right )}{2 d e}+\frac {b^2 \operatorname {PolyLog}\left (3,-1+\frac {2}{1+i (c+d x)}\right )}{2 d e} \\ \end{align*}
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(381\) vs. \(2(183)=366\).
Time = 0.30 (sec) , antiderivative size = 381, normalized size of antiderivative = 2.08 \[ \int \frac {(a+b \arctan (c+d x))^2}{c e+d e x} \, dx=\frac {-6 i a b \pi ^2-i b^2 \pi ^3+24 i a b \pi \arctan (c+d x)-48 i a b \arctan (c+d x)^2+16 i b^2 \arctan (c+d x)^3-a b \pi \log (16777216)+24 b^2 \arctan (c+d x)^2 \log \left (1-e^{-2 i \arctan (c+d x)}\right )+24 a b \pi \log \left (1+e^{-2 i \arctan (c+d x)}\right )-48 a b \arctan (c+d x) \log \left (1+e^{-2 i \arctan (c+d x)}\right )+48 a b \arctan (c+d x) \log \left (1-e^{2 i \arctan (c+d x)}\right )-24 b^2 \arctan (c+d x)^2 \log \left (1+e^{2 i \arctan (c+d x)}\right )+24 a^2 \log (c+d x)+12 a b \pi \log \left (1+c^2+2 c d x+d^2 x^2\right )-24 i a b \operatorname {PolyLog}\left (2,-e^{-2 i \arctan (c+d x)}\right )+24 i b^2 \arctan (c+d x) \operatorname {PolyLog}\left (2,e^{-2 i \arctan (c+d x)}\right )+24 i b^2 \arctan (c+d x) \operatorname {PolyLog}\left (2,-e^{2 i \arctan (c+d x)}\right )-24 i a b \operatorname {PolyLog}\left (2,e^{2 i \arctan (c+d x)}\right )+12 b^2 \operatorname {PolyLog}\left (3,e^{-2 i \arctan (c+d x)}\right )-12 b^2 \operatorname {PolyLog}\left (3,-e^{2 i \arctan (c+d x)}\right )}{24 d e} \]
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 2.56 (sec) , antiderivative size = 1154, normalized size of antiderivative = 6.31
method | result | size |
derivativedivides | \(\text {Expression too large to display}\) | \(1154\) |
default | \(\text {Expression too large to display}\) | \(1154\) |
parts | \(\text {Expression too large to display}\) | \(1159\) |
[In]
[Out]
\[ \int \frac {(a+b \arctan (c+d x))^2}{c e+d e x} \, dx=\int { \frac {{\left (b \arctan \left (d x + c\right ) + a\right )}^{2}}{d e x + c e} \,d x } \]
[In]
[Out]
\[ \int \frac {(a+b \arctan (c+d x))^2}{c e+d e x} \, dx=\frac {\int \frac {a^{2}}{c + d x}\, dx + \int \frac {b^{2} \operatorname {atan}^{2}{\left (c + d x \right )}}{c + d x}\, dx + \int \frac {2 a b \operatorname {atan}{\left (c + d x \right )}}{c + d x}\, dx}{e} \]
[In]
[Out]
\[ \int \frac {(a+b \arctan (c+d x))^2}{c e+d e x} \, dx=\int { \frac {{\left (b \arctan \left (d x + c\right ) + a\right )}^{2}}{d e x + c e} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {(a+b \arctan (c+d x))^2}{c e+d e x} \, dx=\text {Timed out} \]
[In]
[Out]
Timed out. \[ \int \frac {(a+b \arctan (c+d x))^2}{c e+d e x} \, dx=\int \frac {{\left (a+b\,\mathrm {atan}\left (c+d\,x\right )\right )}^2}{c\,e+d\,e\,x} \,d x \]
[In]
[Out]